package cn.study.service.impl;

import cn.study.entity.StudyEmployee;
import cn.study.mapper.StudyEmployeeMapper;
import cn.study.service.StudyEmployeeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 员工表 服务实现类
 * </p>
 *
 * @author qiao
 * @since 2020-06-22
 */
@Service
public class StudyEmployeeServiceImpl extends ServiceImpl<StudyEmployeeMapper, StudyEmployee> implements StudyEmployeeService {


    @Autowired
    StudyEmployeeMapper studyEmployeeMapper;

    public StudyEmployee login(HashMap<String, Object> map){
        List<StudyEmployee> list= studyEmployeeMapper.selectByMap(map);
        return list.size()!=0?list.get(0):null;
    }

    @Override
    public List<StudyEmployee> getList(Integer id) {
        return studyEmployeeMapper.getList(id);
    }
}
